<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>

		<script type="text/javascript">
			var max;
			var p = [2, 8, 21, 74, 28, 99];
			for (var i = 0; i < p.length - 1; i++) {
				if (p[i] > p[i + 1]) {
					max = p[i];
				} else {
					max = p[i + 1];
				}
			}
			document.write(max);
		</script>
	</body>
</html>
